﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *  
 **/

using System.Collections.Generic;
using System.Threading.Tasks;

namespace Peter.Common.Interfaces
{
   /// <summary>
   /// Implementation of a quick open provider.
   /// </summary>
   public interface IQuickOpenProvider
   {
      /// <summary>
      /// Gets the title of the quick open provider.
      /// </summary>
      string Title { get; }

      /// <summary>
      /// Opens the quick open item with the given key.
      /// </summary>
      /// <param name="item">The quick open item to...open...</param>
      /// <returns>The results of the quick open.</returns>
      QuickOpenResults Open (QuickOpenItem item);

      /// <summary>
      /// Gets a list of quick open items for quick open to use.
      /// </summary>
      /// <param name="filter">The Quick open filter.</param>
      /// <returns>A list of quick open items.</returns>
      Task<IEnumerable <QuickOpenItem>> GetQuickOpenItemsAsync (string filter);
   }
}
